<template>
    <div>
        <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"
            background-color="#D4DDE5" text-color="#000" active-text-color="#479CFF" router>
            <el-submenu index="1">
                <template slot="title">
                    <i class="el-icon-monitor"></i>
                    <span>学生信息管理</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="/home/enter_student_info">
                        学生信息录入表
                    </el-menu-item>
                    <el-menu-item index="/home/find_student_info">
                        学生信息查询表
                    </el-menu-item>
                </el-menu-item-group>
            </el-submenu>
            <el-submenu index="2">
                <template slot="title">
                    <i class="el-icon-s-management"></i>
                    <span>学生成绩管理</span>
                </template>
                <el-menu-item-group>
                    <el-menu-item index="/home/enteryExam">
                        学生成绩录入表
                    </el-menu-item>
                    <el-menu-item index="/home/examFind">
                        学生成绩查询表
                    </el-menu-item>
                </el-menu-item-group>
            </el-submenu>
            <el-menu-item index="/home/analyExam">
                <i class="el-icon-s-data"></i>
                <span slot="title">学生成绩分析</span>
            </el-menu-item>
        </el-menu>
    </div>
</template>

<script>
import { Menu, Submenu, MenuItemGroup, MenuItem } from 'element-ui';
export default {
    components: {
        "el-menu": Menu,
        "el-submenu": Submenu,
        "el-menu-item-group": MenuItemGroup,
        "el-menu-item": MenuItem
    },
    methods: {
        handleOpen(key, keyPath) {
            console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
            console.log(key, keyPath);
        }
    }
}
</script>

<style lang="scss" scoped>

</style>